import URL from '@/config/url'
import utils from '@/utils/utils'

export default {
	// 获取装修企业列表
	getList(params = {}){
		let data = {
			keyword:params.keyword,
			// bedroom_num:params.bedroom_num,
			service_type:params.service_type,
			comment_num:params.comment_num,
			case_num:params.case_num,
			offer:params.offer,
			page:params.page,
			pagesizeL:params.pagesize
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/Decoration/getList',data})
	},
	
	// 获取装修企业推荐列表
	getRecommendList(params = {}){
		return utils.uniRequest({url:URL.BASE + '/decoration/Decoration/getRecommendList'})
	},
	
	// 获取装企详情
	getDetail(params = {}){
		let data = {
			decoration_id:params.decoration_id
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/Decoration/getDetail',data})
	},
	
	// 关注装企
	focusDecoration(params = {}){
		let data = {
			decoration_id:params.decoration_id,
			status:params.status
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/Decoration/userFollow',data})
	},
	
	// 装企用户评价
	DecorationComment(params = {}){
		let data = {
			decoration_id:params.decoration_id,
			content:params.content,
			type:params.type,
			media:params.media,
			overall_score:params.overall_score,
			design_score:params.design_score,
			service_score:params.service_score,
			communicate_score:params.communicate_score,
			budget_score:params.budget_score,
			is_anonymous:params.is_anonymous
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/Decoration/comment',data})
	},
	
	// 获取团队列表
	getTeamList(params = {}){
		let data = {
			decoration_id:params.decoration_id,
			team_type:params.team_type, //团队类型(1设计师,2施工队)
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/builder/getList',data})
	},
	
	// 动态列表
	getDynaList(params = {}){
		let data = {
			partner_id:params.partner_id,
			partner_type:params.partner_type,
			type:params.type,
			page:params.page,
			pagesize:params.pagesize
		}
		return utils.uniRequest({url:URL.BASE + '/dt/base/Trend/getList',data})
	},
	
	// 获取设计案例
	getDesginCase(params = {}){
		let data = {
			estate_id:params.estate_id,
			house_id:params.house_id,
			keyword:params.keyword,
			bedroom_num:params.bedroom_num,
			area:params.area,
			offer:params.offer,
			style:params.style,
			is_display:params.is_display,
			is_light_design:params.is_light_design,
			decoration_id:params.decoration_id,
			page:params.page,
			pagesize:params.pagesize
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/DecorationCase/getDesignCaseList',data})
	},
	// 获取设计案例详情
	desginCaseDetail(params = {}){
		let data = {
			case_id:params.case_id
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/DecorationCase/getDesignCaseDetail',data})
	},
	// 设计案例分享
	getsharetrace(params = {}){
		let data = {
			case_id:params.case_id
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/DecorationCase/getDesignCaseShareInfo',data})
	},
	
	// 获取施工案例
	getBuildCase(params = {}){
		let data = {
			decoration_id:params.decoration_id,
			keyword:params.keyword,
			area:params.area,
			offer:params.offer,
			style:params.style,
			page:params.page,
			pagesize:params.pagesize
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/DecorationCase/getBuildCaseList',data})
	},
	// 获取施工案例详情
	buildCaseDetail(params = {}){
		let data = {
			case_id:params.case_id
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/DecorationCase/getBuildCaseDetail',data})
	},
	// 施工案例分享
	getTeamShare(params = {}){
		let data = {
			case_id:params.case_id
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/DecorationCase/getBuildCaseShareInfo',data})
	},
	
	
	// 案例点赞
	supportDemo(params = {}){
		let data = {
			case_id:params.case_id,
			status:params.status
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/DecorationCase/support',data})
	},
	// 案例转发
	getforward(params = {}){
		let data = {
			case_id:params.case_id
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/DecorationCase/forward',data})
	},
	
	// 记录足迹
	gettrace(params = {}){
		let data = {
			case_id:params.case_id
		}
		return utils.uniRequest({url:URL.BASE + '/dt/base/Trend/trace',data})
	},
	
	// 案例评论列表
	getDemoComment(params = {}){
		let data = {
			case_id:params.case_id,
			page:params.page,
			pagesize:10
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/DecorationCase/getCommentList',data})
	},
	// 案例评论
	commentDemo(params = {}){
		let data = {
			case_id:params.case_id,
			content:params.content
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/DecorationCase/comment',data})
	},
	// 案例评论回复
	replyDemo(params = {}){
		let data = {
			comment_id:params.comment_id,
			content:params.content
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/DecorationCase/reply',data})
	},
	// 删除评论
	replyDemodel(params = {}){
		let data = {
			comment_id:params.comment_id
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/DecorationCase/delComment',data})
	},
	
	//获取 案例商品清单
	getDemoshop(params = {}){
		let data = {
			case_id:params.case_id
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/DecorationCase/getProductList',data})
	},
	
	// 获取案例风格
	getDesginStyle(params = {}){
		let data = {
			type:params.type
		}
		return utils.uniRequest({url:URL.BASE + '/base/option/getList',data})
	},
	
	// 获取工地列表
	getConstrList(params = {}){
		let data = {
			decoration_id:params.decoration_id,
			page:params.page,
			pagesize:params.pagesize
		}
		return utils.uniRequest({url:URL.BASE + '/decoration/Decoration/getWorksiteList',data})
	},
	
	// 评价列表
	getEvalList(params = {}){
		let data = {
			decoration_id:params.decoration_id,
			page:params.page,
			pagesize:params.pagesize,
			type:params.type
		}
		let url = params.evalType=='desgin'?'/decoration/DecorationOrder/getDesignCommentList':'/decoration/DecorationOrder/getBuildCommentList';
		return utils.uniRequest({url:URL.BASE + url,data})
	},
	
	// 动态点赞
	gitTrendstatus(params = {}){
		let data = {
			trend_id:params.trend_id,
			status:params.status
		}
		return utils.uniRequest({url:URL.BASE + '/dt/base/Trend/support',data})
	},
	
	// 动态转发
	gettrends(params = {}){
		let data = {
			trend_id:params.trend_id
		}
		return utils.uniRequest({url:URL.BASE + '/dt/base/Trend/forward',data})
	},
	
	// 动态分享
	getshareTrend(params = {}){
		let data = {
			trend_id:params.trend_id
		}
		return utils.uniRequest({url:URL.BASE + '/dt/base/Trend/getShareInfo',data})
	},
	
	// 动态评论列表
	getCommentList(params = {}){
		let data = {
			trend_id:params.trend_id,
			page:params.page,
			pagesize:params.pagesize
		}
		return utils.uniRequest({url:URL.BASE + '/dt/base/Trend/getCommentList',data})
	},
	// 动态评论
	getcomment(params = {}){
		let data = {
			trend_id:params.trend_id,
			content:params.content
		}
		return utils.uniRequest({url:URL.BASE + '/dt/base/Trend/comment',data})
	},
	// 动态评论回复
	getcommentreply(params = {}){
		let data = {
			comment_id:params.comment_id,
			content:params.content
		}
		return utils.uniRequest({url:URL.BASE + '/dt/base/Trend/reply',data})
	},
	// 动态评论删除
	getcommentdel(params = {}){
		let data = {
			comment_id:params.comment_id
		}
		return utils.uniRequest({url:URL.BASE + '/dt/base/Trend/delComment',data})
	},
	// 动态详情
	getDyncDetail(params = {}){
		let data = {
			trend_id:params.trend_id
		}
		return utils.uniRequest({url:URL.BASE + '/dt/base/Trend/getDetail',data})
	},
	// 动态足迹记录
	getTrendTracetrace(params = {}){
		let data = {
			trend_id:params.trend_id,
			forward_id:params.forward_id
		}
		return utils.uniRequest({url:URL.BASE + '/dt/base/Trend/trace',data})
	},
	
	// 订单申述添加-(施工单)
	appealAddBuild(params = {}){
		let data = {
			order_id:params.order_id,//订单ID
			order_no:params.order_no,//订单号
			order_status:params.order_status,//订单状态(0已取消,1待接单,2待处理,3待支付,4交付中,5已完成,6已关闭)
			order_amount:params.order_amount,//订单金额
			team_id:params.team_id,//施工队ID
			decoration_id:params.decoration_id,//装企ID
			partner_type:params.partner_type,//合作方类型(1施工队,2装企)
			partner_name:params.partner_name,//合作方名称
			partner_phone:params.partner_phone,//合作方电话
			client_name:params.client_name,//客户名称
			client_phone:params.client_phone,//客户电话
			appeal_type:params.appeal_type,//申诉类型
			appeal_desc:params.appeal_desc,//申诉描述
			type:params.type,//类型(1图片,2视频)
			media:params.media,//媒体
		}
		return utils.uniRequest({url:URL.BASE + '/builder/BuilderTeamOrder/appeal',data})
	},
	// 订单申述添加-(设计单)
	appealAddDesgin(params = {}){
		let data = {
			order_id:params.order_id,//订单ID
			order_no:params.order_no,//订单号
			order_status:params.order_status,//订单状态(0已取消,1待接单,2待处理,3待支付,4交付中,5已完成,6已关闭)
			order_amount:params.order_amount,//订单金额
			designer_id:params.designer_id,//设计师ID
			decoration_id:params.decoration_id,//装企ID
			partner_type:params.partner_type,//合作方类型(1设计师,2装企)
			partner_name:params.partner_name,//合作方名称
			partner_phone:params.partner_phone,//合作方电话
			client_name:params.client_name,//客户名称
			client_phone:params.client_phone,//客户电话
			appeal_type:params.appeal_type,//申诉类型
			appeal_desc:params.appeal_desc,//申诉描述
			type:params.type,//类型(1图片,2视频)
			media:params.media,//媒体
		}
		return utils.uniRequest({url:URL.BASE + '/designer/DesignerOrder/appeal',data})
	}
	
	
	
}